package com.guodaxia.gzh.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Ajax<T> {
    public int code;
    public String msg;
    public T data;


    public static  Ajax ok(Object data){
        return new Ajax(200,"ok",data);
    }
    public static Ajax error(String msg){
        return new Ajax(500,msg,null);
    }

}
